package com.wuseguang.springcloud.controller;


import com.wuseguang.springcloud.Filter.RequestParameterWrapper;
import com.wuseguang.springcloud.entity.MeMoralEducationRecord;
import com.wuseguang.springcloud.service.MeMoralEducationRecordService;
import com.wuseguang.springcloud.util.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 德育-班级德育记录 前端控制器
 * </p>
 *
 * @author 
 * @since 2020-06-28
 */
@RestController
@RequestMapping("/brands")
public class MeMoralEducationRecordController {

    private Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private MeMoralEducationRecordService meMoralEducationRecordServiceImpl;

    /**
     * 查询本周班级德育得分
     * @param deviceid
     * @return
     */
    @RequestMapping("/findMoralEducationRecord")
    public Result findMoralEducationRecord(@RequestParam(value = "deviceid") String deviceid){
        logger.info("查询本周班级德育得分");
        return meMoralEducationRecordServiceImpl.findMoralEducationRecord(deviceid);
    }

    /**
     * 查询德育上周排名
     * @param deviceid
     * @return
     */
    @RequestMapping("/findRankingLastWeek")
    public Result findRankingLastWeek(@RequestParam(value = "deviceid") String deviceid){
        logger.info("查询德育上周排名");
        return meMoralEducationRecordServiceImpl.findRankingLastWeek(deviceid);
    }

}

